package com.example.order_service.service;

import com.example.order_service.fallback.ProductClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 商品服务客户端
 */
@FeignClient(name = "product-service", fallback = ProductClientFallback.class)
public interface ProductClient {

    // 和ProductController下的方法注解和参数一致
    @GetMapping("/api/v1/product/find")
    String findById(@RequestParam("id")int id);

}
